A conventional embedded system includes a system-on-chip (SOC) processor, a memory such as flash memory and/or static random access memory (SRAM), and limited peripherals. System firmware stored in the memory can be upgraded after the system has been deployed to a customer. It is preferably more cost effective to perform such system firmware upgrades remotely via a network connection.
However, performing a remote upgrade on sensitive system firmware such as the boot loader can be dangerous due to the structured relationship between the core CPU of the SOC processor and the boot loader. Particularly, because the core CPU always boots from a hardware defined address, the boot loader is required to be in a predetermined sector of the flash memory, which is generally the first sector of the main flash memory. The CPU can select the boot loader by a Flash Chip Select (CS) signal. However, when upgrading the boot loader, an erase-upgrade sequence has to be performed. If a power fault occurs during this sequence before completion, the system will not be able to be restored without being brought directly to the system manufacturer.
Therefore, what is needed is a method, system or apparatus for providing a boot loader in an embedded system that can be upgraded remotely via a network having a reduced risk of system failure.